package com.aaa.service.impl;
import com.aaa.dao.T_CommentDao;
import com.aaa.service.T_CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author: TT
 * @Date: 2019/3/9 8:40
 * @Version 1.0
 */
@Service
public class T_CommentServiceImpl implements T_CommentService {

   @Autowired
       private T_CommentDao dao;
    public List<Map> getAll(Map map) {
        List list=new ArrayList();
        for (int i = 0; i < dao.SelectAll(map).size();i++) {
            Map map1=dao.SelectAll(map).get(i);
            String str=map1.get("yid").toString();
            map1.put("yid",str);
            list.add(map1);
        }
        return list;

    }

    @Override
    public Integer getCount(Map map) {
        return dao.getCount(map);
    }
    @Override
    public Integer insert(Map map) {
        return dao.Insert(map);
    }

    @Override
    public Integer update(Map map) {
        return dao.Update(map);
    }
    @Override
    public Integer del(Map map) {
        return  dao.Del(map);
    }

    @Override
    public Integer open(Integer id) {
        return dao.open(id);
    }
}
